Transmitting video and sharing content via a network

ABSTRACT

Embodiments disclose systems and methods for transmitting user-extracted video and content more efficiently by recognizing that user-extracted video provides the potential to treat parts of a single frame of a user-extracted video differently. An alpha mask of the image part of the user-extracted video is used when encoding the image part so that it retains a higher quality upon transmission than the remainder of the user-extracted video.

FIELD OF THE INVENTION

Embodiments of the present invention relate to transmitting video andsharing content via a network, and in particular, to more efficientlytransmitting video and content via a network by transmitting themseparately using optimized protocols.

BACKGROUND

Some video transmission systems merge video and content to be sharedinto one video stream. In such systems, the video stream may betransmitted using standard video codecs and streaming protocols. Uponreceipt, the video and content are displayed for view on a web browser.These systems require no processing of the video stream at the viewersite aside from the processes related to receiving and displaying. Suchsystems typically treat the combined video and shared content similarlyregarding methods of compression, transmission, reception, and displayeven though different methods may be more efficient or otherwise moresuitable for each of the components that went into the video stream.

Where transmission systems send video and content separately, the videoitself is typically transmitted using processes that treat the pixels ofthe video uniformly. Thus, such current transmission systems do notexploit the potential provided by user-extracted video to differentiatebetween an image part and a background part of the user-extracted video,or between an image part and a non-image part of a user-extracted videocombined with another video or other content.

Also, current video transmission systems do not support the use of analpha mask (also known as an “alpha channel”), though there have beenefforts to modify current systems to support WebM video with an alphachannel for VP8 video.

SUMMARY

Embodiments of the claimed subject matter disclose methods and systemsrelated to transmitting user-extracted video and content moreefficiently. These embodiments recognize that user-extracted videoprovides the potential to treat parts of a single frame of theuser-extracted video differently, e.g., the image part of theuser-extracted video may be encoded to retain a higher quality upondecoding than the remainder of the user-extracted video. Such differenttreatment of the parts of a user-extracted video may allow moreefficient transmission.

According to such embodiments, a user-extracted video is created alongwith an associated alpha-mask, which identifies the image part of theuser-extracted video. If the image part is more important than theremainder of the user-extracted video, e.g., if it is a higher priorityto have a high-resolution image part, it is processed for transmissionusing methods that preserve its quality or resolution in comparison tothe remainder of the user-extracted video. During this processing thealpha mask is used to differentiate between the image part and theremainder of the user-extracted video. The processed video is then sentto a receiving computer.

In an embodiment, content is also selected and combined with theuser-extracted video to create a composite video. During processing, thealpha mask is then used to differentiate between the image part and, inthis embodiment, the remainder of the composite video.

In an embodiment, a chroma-key is employed to include the alpha mask inthe encoded video. Dechroma-keying is then used to re-generate the alphamask from the sent and decoded video. The re-generated alpha mask isused to determine an alpha value for each pixel of each frame of thedecoded video, with the alpha value for a pixel being based on thedifference between the pixel color in the decoded video and a key color.The alpha value is then used to determine whether to display that pixelcolor on the pixel.

In an embodiment, control information regarding a dynamic chroma-key issent. The control information represents a dynamic chroma-key representsa key color that is not found within the associated image part of thevideo. This key color was used to replace the remainder of theassociated user-extracted video. Should the image part of the videochange and a pixel color changes to match the key color, a new key coloris chosen to replace the remainder of the associated user-extractedvideo. The control information is then changed to represent the new keycolor.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a schematic diagram of an exemplary system accordingto some embodiments.

FIG. 2 illustrates an exemplary screen shot according to someembodiments.

FIG. 3 illustrates a flow chart of a method according to someembodiments.

FIG. 4 illustrates a schematic diagram of a method according to someembodiments.

FIG. 5 illustrates a diagram of a chroma-keying method according to someembodiments.

FIG. 6 illustrates a flow chart of a method for dynamic chroma-keyingaccording to some embodiments.

FIG. 7 illustrates a conceptual diagram illustrating aspects of dynamicchroma-keying according to some embodiments.

FIG. 8 illustrates an exemplary video frame depicting aspects of dynamicchroma-keying according to some embodiments.

FIG. 9 illustrates a flowchart of an encoding method according to someembodiments.

FIG. 10 illustrates a diagram of a dechroma-keying method according tosome embodiments.

FIG. 11 illustrates an example video comprising a background portion anda foreground portion in accordance with some embodiments.

FIG. 12 illustrates an example video with the background portionsubtracted or removed.

FIG. 13 illustrates an example composite video comprising a foregroundvideo with a background feed in accordance with some embodiments.

FIG. 14 illustrates an example setup comprising illustrates an examplesetup comprising a threshold for displaying the foreground video withthe background feed in accordance with some embodiments.

FIG. 15 illustrates an embodiment of a camera system for foregroundvideo embedding in accordance with some embodiments.

FIG. 16 illustrates an embodiment of a computer system and networksystem that incorporates foreground video embedding systems and methods.

DETAILED DESCRIPTION

In the following description, numerous details and alternatives are setforth for purpose of explanation. However, one of ordinary skill in theart will realize that embodiments can be practiced without the use ofthese specific details. In other instances, well-known structures anddevices are shown in block diagram form to not obscure the embodimentswith unnecessary detail. And the methods described within may bedescribed in one order, but one of skill will realize the methods may beemployed in a number of different orders.

FIG. 1 illustrates a schematic diagram of an exemplary transmissionsystem 100 according to some embodiments. In transmission system 100,sender 102 transmits content 104, control information 106, and video108, to receiver 110. Content 104, control information 106, and video108 are transmitted over network 112. However, the methods fortransmitting content 104, control information 106, and video 108 maydiffer depending on, for example, the underlying data type. In theexemplary transmission system 100, content 104, which may includedocuments, video, or a desktop screen, for example, is shown beingtransmitted by cloud-based content sharing services 114, such as GoogleDocs™, MS Office 365™, Prezi™, or YouTube™. Control information 106 isshown being transmitted separately by XMPP web server 116. Controlinformation 106 assists with presenting content 104 with video 108.Examples of control information 106 include information indicatingwhether the background of video 108 is to be displayed, and whether thevideo 108 is to be muted, which is facilitated by information exchange107. In addition, should content 104 include a shared video, controlinformation 106 may include information regarding which frame of theshared video is playing so that video players at sender 102 and receiver110 play the same video frame at the same time, which is facilitated byinformation exchange 105. Further examples of control information 106include information required to synchronize the display of content 104with video 108, and information regarding the compression of content 104and video 108. User-extracted video 108 is shown being transmittedseparately by a video-streaming server 118. User-extracted video isdiscussed in more detail within regarding FIGS. 11-15.

In FIG. 1, receiver 110 receives content 104, control information 106,and user-extracted video 108. Receiver 110 processes content 104 andvideo 108 according to control information 106. An exemplary result ofsuch processing is illustrated in FIG. 2.

Still regarding FIG. 1, user-extracted video 108 and shared content 104may be streamed separately in different ways. This results inpotentially three different types of transmitted data, with thedifferences between the data providing opportunities to individuallytailor and optimize the transmission of each type separately from theothers.

First, regarding user-extracted video data 108, chroma-keying processingmay be used to embed an alpha mask in the video frame. Such embedding istypically performed in real-time. An alpha mask represents a video frameusing 0 or 1 for each pixel of that frame. Where the alpha mask containsa 0, that pixel is part of the background part of the user-extractedvideo. Where the alpha mask contains a 1, that pixel is part of theimage part of the user-extracted video. An alpha mask is created duringthe extraction of the user from the video, which is discussed within.Video data 108 may then be compressed using a standard encoder or anencoder according to an embodiment (“Z-encoder,” see the discussion ofFIG. 4). Subsequently, video data 107 may be sent peer-to-peer orbroadcast by a media streaming server using network application layerprotocols such as Real-Time Transport Protocol (RTP), Real-TimeMessaging Protocols (RTMP), Real-Time Messaging Protocols Tunneled(RTMPT), HTTP Live Streaming (HLS), or HTTP Dynamic Streaming (HDS).

Second, regarding control information 106, this information is used tosynchronize the sharing of content between host/sender 102 andreceiver/viewer 110 displays. For example, should content 106 be adocument and have been sent ahead of video data 108, then controlinformation 106 would need information necessary to synchronize the pagenumber of the document with video data 108. Control information 106 alsocontains rendering information, (e.g., the relative position, size, anddegree of transparency of the user-extracted video 108, for renderingthat video with the shared content 104).

Third, regarding content 104, such content may include, (e.g.,documents, photos, presentation slides, video clips, and web pages)which may be uploaded from, (e.g., a user computer), and also fromshared cloud services like Google Docs™, Microsoft Office 365™,YouTube™, Vimeo™, and SlideShare™. By splitting the data and handlingdifferent video streams with codecs and protocols that are matched to,or optimized for, the specific streaming data (e.g., still image orvideo), various system embodiments help to minimize transmission bitrate requirements while retaining visual quality. Codecs and protocolsmay, for example, be optimized to improve the resolution and frame rateof video 108, since video typically contains movement. And codecs andprotocols for content 104 may be optimized to improve content details.In embodiments, “smart” strategies are employed that automaticallychoose different protocols based on the type of data (e.g., video,document, etc.) being transmitted.

FIG. 1 illustrates the case where sender 102 is sending content 104 toreceiver 110. In some embodiments, receiver 110 may then also create auser-extracted video and transmit that video to sender 102 using thesame methods to create a video conference, with both sender 102 andreceiver 110 viewing each other and themselves on the display in realtime. Receiver 110 may also send content to sender 102. In additionalembodiments, sender 102 and receiver 110 each create user-extractedvideos, these videos are combined with content from either or both ofsender 102 and receiver 110, both user-extracted videos and content arecombined, and the combination is transmitted to a third party viewer.Sender 102 and receiver 110 would both need software to create andcombine user-extracted videos and content, but either sender 102 orreceiver 110 could send the combination to the third party viewer. Thethird party viewer may employ a typical web browser to view thecombination. Software employed by sender 102 and receiver 110 mayinclude Javascript, Flash, and plain implementation codes. In anembodiment, receiver 110 could receive user-extracted videos frommultiple senders 102 and render all user-extracted videos received andcreated on shared content 104.

FIG. 2 illustrates an exemplary screen shot 200 according to someembodiments. In screen shot 200, content 104 is displayed in contentframe 202. In this example, content 104 is a bar chart 204 entitled“financial impact.” Video 108 is depicted by a user-extracted video 208displayed in a canvas 206. In this example, video 108 includes an imagepart 216 and a background part 218. Background part 218 is depicted asbeing shaded for illustration purposes. In an actual screen shot,background part 218 may be transparent making image part 216 appear tobe superimposed over bar chart 204. Control information 106, though notshown in FIG. 2, is used by receiver 110 to receive and display barchart 204 and video 208. Content buttons 210, 212, and 214, indicatethat receiver 110 may receive content from more than one receiver, ormay receive different content from the same receiver. A user at receiver110, through content buttons 210-214, may select and display the contentindividually or in any combination.

In some embodiments, the sender processing flow may be as follows.First, a user persona is extracted from a video (see FIGS. 11-15). Also,an alpha mask is created to define an image part and a background partof the user persona. And content may be selected for sharing. Then adynamic chroma-keying technique is applied to the background part. Witha dynamic chroma-keying technique, a color not initially found withinthe image part is used to replace the background part as defined by thealpha mask. Subsequently, should that initial “background” color befound in the image part, a new background color is chosen from thecolors not appearing in the image part (see FIGS. 5-9 for furtherdiscussion). After chroma-keying, the image part and the background partare compressed for transmission. Because it is preferable to have adetailed image part, while the level of detail in the background part isof less importance, the image part may be compressed with methods thatpreserve more detail while losing smoothness of an object's motion. Thebackground part may be compressed with methods that lose detail, (i.e.,“lossy” methods, which generally lose detail but maintain smoothness ofmotion). Thus, using different compression techniques may decrease thebandwidth required to transmit the video while maintaining its overallquality. Information regarding the compression of the image andbackground parts is preferably included in the control information tofacilitate accurate decoding. Control information is then createdregarding the persona and content. Such control information preferablyfacilitates the transmission, reception, and display of the persona andcontent. And dynamic chroma-key information is added to the controlinformation. Then the user persona, content, and control information aretransmitted to a receiving computer. In some embodiments, the protocolsfor each are chosen to optimize the efficiency of transmission, whichmay result in reduced bandwidth and/or an improved resolution. This maynot require entirely different protocols. For example, the content andpersona are similar data types, and thus the same protocol may be usedto transmit the persona and content. The persona and content aredisplayed according to the control information by the receivingcomputer.

Still regarding FIG. 2, content 104, combined with user-extracted video108, may be displayed by a software client. However, since sharedcontent on the cloud is usually rendered from web pages, web browsersmay be used to process, blend, and display content 104 and video 108. Insome embodiments, the receiver processing flow may be as follows. First,the user-extracted video stream 108 may be decoded and dechroma-keyed toextract the alpha mask. Second, the background pixels may be set to betransparent when the frame is rendered on a HTML5 canvas 206 (FIG. 2).Third, shared content 104 is displayed on a Web iFrame object 202 (FIG.2) in a web page that viewers open on their web browsers. Finally,canvas 206, which contains video image part 208, is rendered on the topof the iFrame object 202. The location and size of the canvas isspecified in the control information (control and signaling data) 106.Subsequently, additional canvasses containing additional video imageparts may be rendered on top of iFrame object 202, depending on thenumber of users participating in the session.

FIG. 3 illustrates a flow chart of a method 300 according to someembodiments. At 302, a user-extracted video is created. At 304, an alphamask is created for the user-extracted video, with the alpha maskcorresponding to the image part of the user-extracted video. At 306, thepriority of the image part in relation to the remainder of theuser-extracted video is determined. For example, if the image part ismore important than the remainder of the user-extracted video, then theimage part is given a higher priority. At 308, the user-extracted videois encoded. The encoding may use the alpha mask to encode the image partand the remainder of the user-extracted video differently based in parton the image part priority. At 310, the encoded user-extracted video issent to a receiving computer. And, at 312, the received video is decodedand displayed.

In additional embodiments, the method 300 may further include thefollowing. Content may be selected to accompany the user-extractedvideo. This content may be combined with the user-extracted video tocreate a composite video. In such a case, at 306, the priority of theimage part would be determined in relation to the remainder of thecomposite video, at 308 the alpha mask would be used to encode the imagepart and the remainder of the composite video differently based in parton the priority of the image part, and at 310 the encoded compositevideo would be sent to the at least one receiving computer.

FIG. 4 illustrates a diagram of a method 400 according to someembodiments. At 402, a camera is used to produce a video of a user. At404, the user is extracted from the video (see FIGS. 5-9 regarding userextraction). At 406, the user-extracted video is chroma-keyed based onan alpha mask to define an image part and a background part of theuser-extracted video. At 408, an encoder may compress the user-extractedvideo, content, and control information, though control information isgenerally not compressed since it is relatively a very small amount ofdata. In an embodiment, a Z-encoder (see FIG. 9 and related discussion)compresses the image part and background part of the user-extractedvideo differently—preserving the quality of the image part to a greaterextent than that of the background part. At 410, the user-extractedvideo, content, and control information, compressed or otherwise, aresent via network 412, using separate networking protocol individuallysuited to each, to receiver 414 for subsequent decoding. At 416, theuser-extracted video is dechromakeyed and at 418, the dechromakeyedvideo is blended with content and, at 420, displayed.

Regarding step 408, in some embodiments, the background part is notdisplayed at the receiver. Thus, it would be inefficient for the wholevideo frame to be compressed and transmitted for subsequent discardingof the background part at the receiver. Embodiments disclosed hereinmitigate this inefficiency by embedding alpha mask information in thecolor frame and then executing a chroma-keying technique to separate thevideo frame into an image part and a background part. In suchembodiments, the background part may be encoded or transmitteddifferently (these include, for example, its not being encoded ortransmitted at all). Such is the case, for example, with conferencingapplications where only the user's image (and not their surroundingenvironment) is to be combined or shared for embedding with virtualcontent. This treatment of the background part saves bandwidth by nottransmitting unnecessary pixel data.

FIG. 5 illustrates a diagram of a chroma-keying method according to someembodiments. Chroma-keying 500 replaces the background part 218 (FIG. 2)of the user-extracted video 502 by a key color 504 that is specified bya key color generator 506 within chroma-keying block 406. The backgroundpart 218, defined by an alpha mask 508, is generated from theuser-extraction block 404 (FIG. 4). This produces a chroma-keyed video510. If, at key color generator 506, the key color is not changed oncechosen, then the chroma-keying technique is considered “static.” If thekey color is changed based on extracted video 502, then thechroma-keying technique is considered “dynamic.”

The choice of key color preferably satisfies the followingrequirements: 1) no pixel in the foreground area has the same color asthe key color; 2) there is some safe L₁ norm distance between the keycolor and the closest color in the foreground pixel; and 3) the keycolor does not require frequent change and is chosen to minimize thesize of the encoded video packets. The safe L₁ norm distance is chosenbased on considerations such as data type, compression methods, anddecoding methods.

Regarding the second requirement 2), the reason for the safe distance L₁is that after applying encoding to the video and sending through thenetwork, (e.g., the Internet), the color values may not be preservedcorrectly when uncompressed and decoded into the video for display.Rather, the decoder may give out color values that are similar to, butnot the same as, the uncompressed ones. Thus, the presence of a safe L₁norm distance ensures that the decoded key color values of thebackground part are always separated from decoded color values of theimage part (or foreground area) of the user-extracted video.

Almost all codecs, such as VP8 or H264, prefer the input video in YUVcolor space for the ease and efficiency of video compression. Thus,regarding the static chroma-key technique, to convert from RGB to YUVcolor space, a fixed-point approximation is applied in most digitalimplementations.

Since the value range of the output YUV is normally scaled to [16, 235],it is possible to use the {0, 0, 0} value for key color. This key colorselection satisfies requirements 1-3, above. However, it is not alwaysthe case for all codec implementations that the range of YUV is limitedto [16, 235]. In such cases, an embodiment proposes a dynamic chroma-keytechnique.

FIG. 6 illustrates a flow chart of a method 600 for dynamicchroma-keying according to some embodiments. At 602, it is determinedwhether the key color needs to be recomputed and changed. Such a changeis made in the key frame when encoding 408 (FIG. 4). The decision torecompute is made if there is less than the safe L₁ norm distancebetween the key color and a color in the image part of theuser-extracted video. If the safe distance is maintained, (i.e., “N” or“do not compute key color”), then, at 610, the background part isreplaced using the initial key color. If the safe distance is notmaintained and a new key color is required, then, at 604, adetermination of the colors present in the video frame is made. In someembodiments, a 3D YUV histogram of the colors is build. At 606, thehistogram is searched for the presence of an “empty box” that signifiesan area of color space that is not represented in the image part of theuser-extracted video. Preferably, an empty box is a defined group ofbins within the 3D YUV histogram that are all empty (no color pointsinside). Experimentally, a box with sides equal to or larger than16×16×16 has been enough to differentiate between colors in the image(or foreground) and background parts of the user-extracted video. At608, a key color is chosen from the “empty box.” Preferably, the colorkey is the center of the empty box. And, at 610, the background part (orthe value for the pixel that would be the background part) of theuser-extracted video is replaced with the newly chosen key color.

Still regarding FIG. 6, should static chroma-keying be used, at 608 akey color is chosen, and at 610 the background is replaced.

FIG. 7 illustrates a conceptual diagram illustrating aspects of dynamicchroma-keying according to some embodiments. In FIG. 7, a 3D YUVhistogram 702 has been constructed regarding a hypothetical image partof a user-extracted video frame (not shown). Bins with color pointsinside are indicated by dots 704. An empty box 706 has been constructedabout a color space in which the bins do not contain color points. Thecenter 708 of empty box 706 is then a candidate for being chosen as thecolor key.

At 606, should no empty box of the chosen dimensions be found, the keycolor {y_(k), u_(k), v_(k)} is chosen to minimize the expression:

$E = \left( {\sum\limits_{y_{i} \in {\delta_{y}{\lbrack y_{o}\rbrack}}}{\sum\limits_{u_{j} \in {\delta_{u}{\lbrack u_{o}\rbrack}}}{\sum\limits_{v_{k} \in {\delta_{v}{\lbrack v_{o}\rbrack}}}{{w\left\lbrack {y_{o},u_{o},v_{o}} \right\rbrack}*{H\left\lbrack {y_{i},u_{j},v_{k}} \right\rbrack}}}}} \right)$

Where:

w is the weight of each bin depending on its distance from the center ofthe box;

δ_(y), δ_(u), δ_(v) is the neighborhood area in y, u, v axis,respectively; and

H[y,u,v] is the bin value of color {y,u,v}.

If, at 606, E>0, which means that there is at least one pixel value inthe image part/foreground area that has its color inside the center boxand its neighboring boxes, then that pixel color value is modified sothat it no longer lies inside the box. This works to avoid ambiguity indechroma-keying step.

Compared to the static chroma-key method, the dynamic chroma-key methodrequires more computation and bandwidth. Therefore, it is preferable touse the dynamic method only when the static method cannot be applied.

FIG. 8 illustrates an exemplary video frame 800 depicting aspects ofdynamic chroma-keying according to some embodiments. A quantized depthvalue 802 and a chroma-keying flag 804 are useful for renderinguser-extracted video, and are preferably transmitted together with otheruser extraction information such as: fading level, user depth value, andbackground visibility (whether to show or not show background). Suchinformation is grouped under the term, “side information.” The depthvalue 802 is embedded in a macro block 806 and the chroma-keying flag804 is embedded in a macro block 808. In an embodiment, a macro block isa 16×16 block of pixels. Macro blocks 806 and 808, located at the topleft corner in each video frame, contain the depth value 802 and thechroma-keying flag 804. The value of all pixels in macro block 806 isthe 255-level quantized depth value 802. Macro block 808 is used by thereceiver to determine whether or not chroma-keying is applied. In someembodiments, to determine whether or not chroma-keying is applied, thereceiver averages the value of all pixels inside the macro block andcompares the average with the key color value. If the difference issignificant enough, (e.g., past a threshold value), no chroma-keying isapplied at the sender side to that frame. In this case, the sendertransmits the background part of the video, and the receiver displaysthe background pixels.

FIG. 9 illustrates a flowchart of a z-encoding method 900 according tosome embodiments. Z-encoder method 900 generally discloses encoding andsaving bandwidth by: using an alpha mask 910 to guide a quantizationblock 950; and determining the differences between frames of video fromchroma-keying block 406. The differences are then processed, compressed,and sent to the receiver 110 (FIG. 1). Receiver 110 can reproduce acurrent frame 920 given a previous frame (which it will already have)and the differences between the previous frame and the current frame. InZ-encoder method 900, a current video frame 920 from chroma-keying block406 (FIG. 4) is divided into small macro blocks (typically 16×16 blocksof pixels). Current video frame 920 may, for example, be a compositevideo with both content and a user-extracted image, or a video of only auser-extracted image. Prediction block 930 determines the differencesbetween the current video frame 920 and a previous frame (not shown)based on a block matching difference metric. In transform block 940, thedifference information is transformed so that its energy (i.e., theamount of information) is compacted into a few data values. Typically, adiscrete cosine transform (DCT) is applied in such a transformation.Quantization block 950 works to reduce the range of data values into asmaller number of possible values. For example, 16-bit color (with65,536 possible values) can be quantized into 8-bit color (255 possiblevalues). Such quantization does result in losing information regardingthe video frame. Entropy encoder 960 is a lossless compression whichcompresses data even more. Prediction block 930, transform block 940,and quantization block 950, are designed to prepare the data from videoframe 920 so that it is efficient for entropy encoder 960 to encode.

Regarding quantization block 950, at 970 an alpha mask 910 from theuser-extraction process may be used to drive the quality of aquantization block 950 so that macro blocks in the user-image oruser-extracted region of a video frame 920, i.e., the more importantsections, are quantized with more bits than the background. Alpha mask910 allows the encoder to identify the location of the image part 216(FIG. 2) in the canvas 218. This information is added to thequantization block 950, allowing the encoder method 900 to avoidencoding blocks that do not contain elements of image part 216. Thispreserves the quality of the image part 216, or user region, duringencoding. And by using fewer bits to quantize the background part (inthe case of a video of a user-extracted image) or content (in the caseof a composite video with content and a user-extracted image), itreduces the bandwidth required to transmit the encoded video stream.Skipping, (i.e., not encoding), the background part of a user-extractedvideo also saves additional processing time.

Efficiencies are gained in compression by addressing the differentrequirements of the content. When content is shared, the changes incontent that accompany a change in video frame are typically small. Insuch case the Z-encoder may compress only those changes in the contentfollowing the method 900 described above with respect to video frame920. In an additional embodiment, should it be determined that thebackground or content portion of video frame 920 is actually moreimportant than the user-extracted image, then the alpha mask 910 fromthe user-extraction process may be used to drive the quality of aquantization block 950 so that macro blocks in the background or contentregion of a video frame 920 are quantized with more bits than theuser-extracted image using the method described. And, in general, method900 does not require that video frame 920 has gone through thechroma-keying process. Furthermore, in an embodiment, alpha mask 910 maybe used to drive the quality of a quantization block 950 with theinformation from alpha mask 910 added through optional path 980 toprediction block 930.

FIG. 10 illustrates a flow diagram of a dechroma-keying method 416according to some embodiments. After being decoded by the receiver 414(FIG. 4), the video 1010 is sent to dechroma-keying 416 (see also FIG.4) to generate an alpha mask 1020 for each video frame. In thedechrom-keying method 416, at 1030, side information 1032 is extracted.Side information 1032 includes, for example, user fading control 1034,user depth value 1036, and background visibility control 1038. Userfading control 1034 and user depth value 1036 may inform display block420 (FIG. 4) how transparent to make the image of the user in decodedvideo 1010. The level of transparency may be determined based on thedistance of the user from the video camera. Background visibilitycontrol 1038 informs display block 420 whether to display the backgroundpart of decoded video 1010. At 1040, key color detector block 1042detects key color 1044. Then, at 1050, alpha mask recovery block 1052determines the alpha value of each pixel in decoded video 1010 based onthe difference between the pixel color value (not shown) and key color1044. If the pixel color and key color 1044 are the same, the value ofalpha mask 1020 is set to 0 for that pixel. This means that the pixel isconsidered a background part and is to be transparent when blending. Ifthe pixel color and key color 1044 are different, the alpha value is setto 1. In an embodiment, the values for the pixel color and key color1044 are considered to be different if their color values differ by morethan a specified amount. At 1060, alpha mask edge processing isperformed.

After dechroma-keying 416, the frame of decoded video 1010 and thegenerated alpha mask 1020 are sent to the alpha blending block 418 (FIG.4) to make the image for display block 420. Alpha blending block 418 maycombine decoded video 1010 with any additional content 104 (FIG. 1), oradditional user-extracted video 108 (FIG. 1). Alpha mask 1020 containsan alpha value for each pixel of the decoded video frame that specifieshow much the pixel color value contributes to the blended color value ofthe output display. Side information may be used to modify alpha mask1020 according to control input from the user at the sender side. Thealpha value may then range from 0 to 1 (or 0% to 100%). The alphablending formula is as follows (where C_(blended), C_(video), andC_(content) equal the color values of the blended pixel, video pixel,and content pixel, respectively):

C _(blended) =α*C _(video)+(1−α)*C _(content)

The following contains sample Javascript HTML5 code for implementingaspects of the embodiments, such as: streaming live video, initializingvideo and canvas sizes, and binding post-processing actions to videoduring streaming.

<script type = “text/javascript”> /***  *Dechroma a streaming HTML5video with deChromakey filter and render the  * userExtraction (UE -with transparent background) into a Canvas using JavaScript  * ThisCanvas is placed with absolute position over the web content using CSS. */ document.addEventListener(‘DOMContentLoaded’, function( ) { /*Stream the Live video (rtmp, hls, hds...) */ var html5Video =document.getElementById(‘html5Video’), cWidth = html5Video.clientWidth,cHeight = html5Video.clientHeight, UECanvas =document.getElementById(‘UECanvas’), /*Output the UE after dechromakey*/ UE = UECanvas.getContext(‘2d’), deChromaCanvas =document.createElement(‘canvas’),/* Use to run the dechromakey filter */deChroma = deChromaCanvas.getContext(‘2d’), deChromaRunner = null,deChromaInterval = 20, keyColor = {r:0, g:0, b:0, r_range:16,g_range:16, b_range:16}; /* key color */ /* Init video & canvas, copywidth and height to canvases */ UECanvas.width = cWidth; UECanvas.height= cHeight; deChromaCanvas.width = cWidth; deChromaCanvas.height =cHeight; /* Binding post processing actions to html5Video during itsstreaming */ html5Video.addEventListener(‘play’, function( ) { html5Video.style.visibility = ‘hidden’;  clearInterval(deChromaRunner); deChromaRunner =setInterval(deChromakey,deChromaInterval,html5Video,UE,deChroma,keyColor,cWidth,cHeight); },false); },false); functiondeChromakey (html5Video,UE,deChroma,keyColor,cWidth,cHeight) {if(html5Video.paused || html5Video.ended) return false; /* Step 1: copycurrent video frame to the deChromaCanvas */deChroma.drawImage(html5Video,0,0,cWidth,cHeight); /* Step 2: get thepixel data from the deChromaCanvas */ var imageData =deChroma.getImageData(0,0,cWidth,cHeight); var data = imageData.data; /*Step 3: Loop through the pixels, make them transparent if they matchkeyColor */ for(var i = 0; i < data.length; i+=4) { var r = data[i]; varg = data[i+1]; var b = data[i+2] ; if (Math.abs(r-keyColor.r)<=keyColor.r_range &&  Math.abs(g-keyColor.g)<=keyColor.g_range && Math.abs(b-keyColor.b)<=keyColor.b_range)  data[i+3] = 0; }imageData.data = data; /* Step 4: Now render the userExtraction onto UEcanvas */ UE.putImageData(imageData,0,0); } </script>

Creating a persona by extracting a user image from a video will now bedescribed regarding FIGS. 11-14. FIG. 11 illustrates an example video1100. In general, the example video 1100 comprises a background portion1110 and a persona 1120. For example, the background portion 1110 maycomprise a wall, outdoor scene, or any other background scene and thepersona 1120 may comprise a human user or presenter. However, thepersona 1120 may comprise any identifiable object or entity. Thus, theexample video 1100 may be divided into at least two portions—abackground 1110 and a persona 1120. For example, if the video 1100comprises a user typing on a keyboard, then the user may comprise thepersona 1120 and a wall of the room behind may comprise the backgroundportion 1110.

FIG. 12 illustrates an example foreground video 1200. In general,foreground video 1200 comprises a persona 1120 of the video 1100 withthe background portion 1110 subtracted or removed. In this regard,foreground video 1200 approximates the video 1100 with the removal orsubtraction of the background portion 1110. Persona 1120 may be selectedas segments of foreground video 1200 of arbitrary length, including asingle frame. A persona created from single foreground video frame mayallow the user to convey an expression or body language, and a personacreated from a video clip may allow the user to convey a gesture oraction. These segments may be saved in foreground video libraries (notshown). During a chat session, persona 1120 may be created and viewed bythe user, but not sent to other members of the chat session untildirected to be associated with content by the user. That direction maytake a number of forms. It may be a keystroke entry directly associatedwith sending a text, such as “enter.” The direction may also beindirectly related to the sending of content. For example, a user couldperuse through an existing library of personas to select an arbitrarysection of a persona video or create a new persona.

FIG. 13 illustrates an example composite video 1300. In general, thecomposite video 1300 comprises the persona 1120 embedded within abackground feed 1310. For example, the persona 1120 may comprise asingle frame of a user and the background feed 1310 may comprise text.In some embodiments, the background feed 1310 may comprise any or all ofan image, a presentation slide, web content, shared desktop, anothervideo, pre-recorded video stream, live video stream, and/or a 3D virtualscene. And composite video 1300 may be of arbitrary length, including asingle frame. In addition, composite video 1300 may be created byreceiving persona 1120 and background feed 1310 from different sources.In such a case, persona 1120 would be sent to the receiver without abackground feed 1310.

FIG. 14 illustrates an example setup 1400 for displaying the foregroundvideo frame with the background feed in accordance with someembodiments. As seen in FIG. 14, a setup 1400 may comprise a camera 1440capable of receiving depth information and color information (e.g., a 3Dcamera). The setup 1400 may further comprise a user presenter 1420 infront of a wall or background 1450. In some embodiments, the camera 1440may receive a depth and color video of the user presenter 1420 in frontof the background 1450. The camera 1440, or a connected computer systemas discussed in further detail below, may subtract or remove thebackground 1450 so as to create a foreground video. The foreground videomay then be embedded into a background feed, and perhaps the backgroundfeed is shown on display 1410. For example, a single frame from theforeground video comprising a persona 1120 representing the userpresenter 1420 may be embedded into text frame in a chat session.

FIG. 15 illustrates an embodiment of a camera system 1500 for theforeground video embedding systems and methods of the presentembodiment. In general, the camera system 1500 comprises a camera 1510,computer 1520, and display 1530.

As seen in FIG. 15, a camera 1510 is connected to a computer 1520. Thecamera 1510 may comprise a three dimensional (3D) camera, depth camera,z-camera and/or range camera. In some embodiments, the camera 1510 maybe comprised of a color or RGB camera and a depth camera or may compriseof a single camera with an RGB sensor and depth sensor. As such, thecamera 1510 receives color information and depth information. Thereceived color information may comprise information related to the colorof each pixel of a video. In some embodiments, the color information isreceived from a Red-Green-Blue (RGB) sensor 1511. As such, the RGBsensor 1511 may capture the color pixel information in a scene of acaptured video image. The camera 1510 may further comprise an infraredsensor 1512 and an infrared illuminator 1513. In some embodiments, theinfrared illuminator 1513 may shine an infrared light through a lens ofthe camera 1510 onto a scene. As the scene is illuminated by theinfrared light, the infrared light will bounce or reflect back to thecamera 1510. The reflected infrared light is received by the infraredsensor 1512. The reflected light received by the infrared sensor resultsin depth information of the scene of the camera 1510. As such, objectswithin the scene or view of the camera 1510 may be illuminated byinfrared light from the infrared illuminator 1513. The infrared lightwill reflect off of objects within the scene or view of the camera 1510and the reflected infrared light will be directed towards the camera1510. The infrared sensor 1512 may receive the reflected infrared lightand determine a depth or distance of the objects within the scene orview of the camera 1510 based on the reflected infrared light.

In some embodiments, the camera 1510 may further comprise asynchronization module 1514 to temporally synchronize the informationfrom the RGB sensor 1511, infrared sensor 1512, and infrared illuminator1513. The synchronization module 1514 may be hardware and/or softwareembedded into the camera 1510. In some embodiments, the camera 1510 mayfurther comprise a 3D application programming interface (API) forproviding an input-output (IO) structure and interface to communicatethe color and depth information to a computer system 1520. The computersystem 1520 may process the received color and depth information andcomprise and perform the systems and methods disclosed herein. In someembodiments, the computer system 1520 may display the foreground videoembedded into the background feed onto a display screen 1530.

FIG. 16 is a diagrammatic representation of a network 1600, includingnodes for client computer systems 1602 ₁ through 1602 _(N), nodes forserver computer systems 1604 ₁ through 1604 _(N), nodes for networkinfrastructure 1606 ₁ through 1606 _(N), any of which nodes may comprisea machine 1650 within which a set of instructions for causing themachine to perform any one of the techniques discussed above may beexecuted. The embodiment shown is purely exemplary, and might beimplemented in the context of one or more of the figures herein.

Any node of the network 1600 may comprise a general-purpose processor, adigital signal processor (DSP), an application specific integratedcircuit (ASIC), a field programmable gate array (FPGA) or otherprogrammable logic device, discrete gate or transistor logic, discretehardware components, or any combination thereof capable to perform thefunctions described herein. A general-purpose processor may be amicroprocessor, but in the alternative, the processor may be anyconventional processor, controller, microcontroller, or state machine. Aprocessor may also be implemented as a combination of computing devices(e.g. a combination of a DSP and a microprocessor, a plurality ofmicroprocessors, one or more microprocessors in conjunction with a DSPcore, or any other such configuration, etc.).

In some embodiments, a node may comprise a machine in the form of avirtual machine (VM), a virtual server, a virtual client, a virtualdesktop, a virtual volume, a network router, a network switch, a networkbridge, a personal digital assistant (PDA), a cellular telephone, a webappliance, or any machine capable of executing a sequence ofinstructions that specify actions to be taken by that machine. Any nodeof the network may communicate cooperatively with another node on thenetwork. In some embodiments, any node of the network may communicatecooperatively with every other node of the network. Further, any node orgroup of nodes on the network may comprise one or more computer systems(e.g. a client computer system, a server computer system) and/or maycomprise one or more embedded computer systems, a massively parallelcomputer system, and/or a cloud computer system.

The computer system 1650 includes a processor 1608 (e.g. a processorcore, a microprocessor, a computing device, etc.), a main memory 1610and a static memory 1612, which communicate with each other via a bus1614. The machine 1650 may further include a display unit 1616 that maycomprise a touch-screen, or a liquid crystal display (LCD), or a lightemitting diode (LED) display, or a cathode ray tube (CRT). As shown, thecomputer system 1650 also includes a human input/output (I/O) device1618 (e.g. a keyboard, an alphanumeric keypad, etc.), a pointing device1620 (e.g. a mouse, a touch screen, etc.), a drive unit 1622 (e.g. adisk drive unit, a CD/DVD drive, a tangible computer readable removablemedia drive, an SSD storage device, etc.), a signal generation device1628 (e.g. a speaker, an audio output, etc.), and a network interfacedevice 1630 (e.g. an Ethernet interface, a wired network interface, awireless network interface, a propagated signal interface, etc.).

The drive unit 1622 includes a machine-readable medium 1624 on which isstored a set of instructions (i.e. software, firmware, middleware, etc.)1626 embodying any one, or all, of the methodologies described above.The set of instructions 1626 is also shown to reside, completely or atleast partially, within the main memory 1610 and/or within the processor1608. The set of instructions 1626 may further be transmitted orreceived via the network interface device 1630 over the network bus1614.

It is to be understood that embodiments may be used as, or to support, aset of instructions executed upon some form of processing core (such asthe CPU of a computer) or otherwise implemented or realized upon orwithin a machine- or computer-readable medium. A machine-readable mediumincludes any mechanism for storing information in a form readable by amachine (e.g. a computer). For example, a machine-readable mediumincludes read-only memory (ROM); random access memory (RAM); magneticdisk storage media; optical storage media; flash memory devices;electrical, optical or acoustical or any other type of media suitablefor storing information.

Although the present embodiment has been described in terms of specificexemplary embodiments, it will be appreciated that various modificationsand alterations might be made by those skilled in the art withoutdeparting from the spirit and scope of the invention. The previousdescription of the disclosed embodiments is provided to enable anyperson skilled in the art to make or use the present invention. Variousmodifications to these embodiments will be readily apparent to thoseskilled in the art, and the generic principles defined herein may beapplied to other embodiments without departing from the spirit or scopeof the invention. Thus, the present invention is not intended to belimited to the embodiments shown herein, but is to be accorded thewidest scope consistent with the principles and novel features disclosedherein.

What is claimed is:
 1. A computer-implemented method for sharing videoand content comprising: creating, with at least one computer, auser-extracted video; creating, with the at least one computer, an alphamask for the user-extracted video, wherein the alpha mask corresponds toan image part of the user-extracted video; prioritizing, with the atleast one computer, the image part in relation to the remainder of theuser-extracted video; encoding, with the at least one computer, the userextracted video, wherein the encoding uses the alpha mask to encode theimage part and the remainder of the user-extracted video differentlybased in part on the prioritizing; and sending, using the at least onecomputer, the encoded user-extracted video to at least one receivingcomputer.
 2. The method of claim 1, further comprising: selecting, withthe at least one computer, content; and combining, with the at least onecomputer, the content with the user-extracted video to create acomposite video, wherein the prioritizing prioritizes the image part inrelation to the remainder of the composite video, the encoding uses thealpha mask to encode the image part and the remainder of the compositevideo differently based in part on the prioritizing, and the sendingsends the encoded composite video to the at least one receivingcomputer.
 3. The method of claim 1, wherein the encoding furthercomprises using a chroma-key, the method further comprising: decoding,with the at least one receiving computer, the user-extracted video;re-generating, with the at least one computer, the alpha mask bydechroma-keying the decoded user-extracted video; determining, with theat least one computer, an alpha value for a pixel of a frame of thedecoded user-extracted video using the re-generated alpha mask, whereinthe alpha value is based on the difference between a pixel color of thepixel of the frame and a key color; and displaying, with the at leastone computer, the pixel color by the pixel of the frame based in part onthe alpha value.
 4. The method of claim 3, wherein the displayingfurther comprises blending the pixel color with a content pixel colorbased in part on the alpha value.
 5. The method of claim 1, wherein theencoding further comprises compressing the image part and the remainderof the user-extracted video, and wherein the compressing of the imagepart is at a higher quality than the compressing of the remainder of theuser-extracted video.
 6. The method of claim 1, further comprising:sending, using the at least one receiving computer, a second encodeduser-extracted video to the at least one computer; decoding, with the atleast one computer, the second user-extracted video; and displaying,with the at least one computer, the user-extracted video combined withthe decoded second user-extracted video.
 7. The method of claim 1,further comprising, sending with the at least one computer, controlinformation to the at least one receiving computer, the controlinformation regarding a dynamic chromakey, said dynamic chromakey:representing a first key color not found within the image part and usedto replace the remainder of the user-extracted video; and, in the eventthe image part changes to contain the first key color, changing torepresent a second key color not found within the image part.
 8. Anon-transitory computer readable storage medium storing one or moreprograms for sharing videos and content, the one or more programscomprising instructions for: creating, with at least one computer, auser-extracted video; creating, with the at least one computer, an alphamask for the user-extracted video, wherein the alpha mask corresponds toan image part of the user-extracted video; prioritizing, with the atleast one computer, the image part in relation to the remainder of theuser-extracted video; encoding, with the at least one computer, the userextracted video, wherein the encoding uses the alpha mask to encode theimage part and the remainder of the user-extracted video differentlybased in part on the prioritizing; and sending, using the at least onecomputer, the encoded user-extracted video to at least one receivingcomputer.
 9. The non-transitory computer readable storage medium ofclaim 8, further comprising instructions for: selecting, with the atleast one computer, content; and combining, with the at least onecomputer, the content with the user-extracted video to create acomposite video, wherein the prioritizing prioritizes the image part inrelation to the remainder of the composite video, the encoding uses thealpha mask to encode the image part and the remainder of the compositevideo differently based in part on the prioritizing, and the sendingsends the encoded composite video to the at least one receivingcomputer.
 10. The non-transitory computer readable storage medium ofclaim 8, wherein the encoding further comprises using a chroma-key, thestorage medium further comprising instructions for: decoding, with theat least one receiving computer, the user-extracted video;re-generating, with the at least one computer, the alpha mask bydechroma-keying the decoded user-extracted video; determining, with theat least one computer, an alpha value for a pixel of a frame of thedecoded user-extracted video using the re-generated alpha mask, whereinthe alpha value is based on the difference between a pixel color of thepixel of the frame and a key color; and displaying, with the at leastone computer, the pixel color by the pixel of the frame based in part onthe alpha value.
 11. The non-transitory computer readable storage mediumof claim 10, wherein the displaying further comprises blending the pixelcolor with a content pixel color based in part on the alpha value. 12.The non-transitory computer readable storage medium of claim 8, whereinthe encoding further comprises compressing the image part and theremainder of the user-extracted video, and wherein the compressing ofthe image part is at a higher quality than the compressing of theremainder of the user-extracted video.
 13. The non-transitory computerreadable storage medium of claim 8, the storage medium comprisingfurther instructions for: sending, using the at least one receivingcomputer, a second encoded user-extracted video to the at least onecomputer; decoding, with the at least one computer, the seconduser-extracted video; and displaying, with the at least one computer,the user-extracted video combined with the decoded second user-extractedvideo.
 14. The non-transitory computer readable storage medium of claim8, the storage medium comprising further instructions for: sending withthe at least one computer, control information to the at least onereceiving computer, the control information regarding a dynamicchromakey, said dynamic chromakey: representing a first key color notfound within the image part and used to replace the remainder of theuser-extracted video; and, in the event the image part changes tocontain the first key color, changing to represent a second key colornot found within the image part.
 15. A system for sharing videos andcontent comprising: at least one computer; and a non-transitory computerreadable medium having stored thereon one or more programs, which whenexecuted by the at least one computer, cause the at least one computerto: create a user-extracted video; create an alpha mask for theuser-extracted video, wherein the alpha mask corresponds to an imagepart of the user-extracted video; prioritize the image part in relationto the remainder of the user-extracted video; encode the user extractedvideo, wherein the alpha mask is used to encode the image part and theremainder of the user-extracted video differently based in part on theimage priority; and send the encoded user-extracted video to at leastone receiving computer.
 16. The system of claim 15, further comprisingprograms, which when executed by the at least one computer, cause the atleast one computer to: select content; and combine the content with theuser-extracted video to create a composite video, wherein the image partis prioritized in relation to the remainder of the composite video, thealpha mask is used to encode image part and the remainder of thecomposite video differently based in part on the image priority, and theencoded composite video is sent to the at least one receiving computer.17. The system of claim 15, further comprising the at least onereceiving computer, wherein the encoding further comprises using achroma-key, the system further comprising programs, which when executedby the at least one receiving computer, cause the at least one receivingcomputer to: decode the user-extracted video; re-generate the alpha maskby dechroma-keying the decoded user-extracted video; determine an alphavalue for a pixel of a frame of the decoded user-extracted video usingthe re-generated alpha mask, wherein the alpha value is based on thedifference between a pixel color of the pixel of the frame and a keycolor; and display the pixel color by the pixel of the frame based inpart on the alpha value.
 18. The system of claim 17, wherein the displayprogramming further causes the at least one receiving computer to blendthe pixel color with a content pixel color based in part on the alphavalue.
 19. The system of claim 15, wherein the encode programmingfurther causes the at least one computer to compresses the image partand the remainder of the user-extracted video, and wherein the imagepart is compressed at a higher quality than the remainder of theuser-extracted video.
 20. The system of claim 15, further comprisingprograms, which when executed by the at least one computer, cause the atleast one computer to: send control information to the at least onereceiving computer, the control information regarding a dynamicchromakey, said dynamic chromakey: representing a first key color notfound within the image part and used to replace the remainder of theuser-extracted video; and, in the event the image part changes tocontain the first key color, changing to represent a second key colornot found within the image part.